package model

import (
	"github.com/go-xorm/xorm"
	"global/structs"
)

const (
	FINANCE_TYPE_SALE = 0
	FINANCE_TYPE_BUY  = 1
)

type orderCoinFinanceModel struct{}

var OrderCoinFinanceModel = new(orderCoinFinanceModel)

// 插入数据
func (orderCoinFinanceModel) InsertItems(session *xorm.Session, logs []*structs.OrderCoinFinance) (bool, error) {
	affected, err := session.Insert(&logs)
	if err == nil && affected > 0 {
		return true, nil
	}
	return false, err
}
